using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Sampling
{
    /// <summary>
    /// <para>Generate Points Along Lines</para>
    /// <para>Creates point features along lines or polygons at fixed intervals or by percentage of a feature's length.</para>
    /// <para>沿线或面以固定间隔或按要素长度的百分比创建点要素。</para>
    /// </summary>    
    [DisplayName("Generate Points Along Lines")]
    public class GeneratePointsAlongLines : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GeneratePointsAlongLines()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Features">
        /// <para>Input Features</para>
        /// <para>The line or polygon features to be converted into points.</para>
        /// <para>要转换为点的线或面要素。</para>
        /// </param>
        /// <param name="_Output_Feature_Class">
        /// <para>Output Feature Class</para>
        /// <para>The point feature class that will be created from the input features.</para>
        /// <para>将根据输入要素创建的点要素类。</para>
        /// </param>
        /// <param name="_Point_Placement">
        /// <para>Point Placement</para>
        /// <para><xdoc>
        ///   <para>Specifies the method used to create points.</para>
        ///   <bulletList>
        ///     <bullet_item>By percentage—The Percentage parameter value will be used to place points along the features by percentage.</bullet_item><para/>
        ///     <bullet_item>By distance—The Distance parameter value will be used to place points at fixed distances along the features. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于创建点的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按百分比—百分比参数值将用于按百分比沿要素放置点。</bullet_item><para/>
        ///     <bullet_item>按距离—距离参数值将用于沿要素以固定距离放置点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public GeneratePointsAlongLines(object _Input_Features, object _Output_Feature_Class, _Point_Placement_value _Point_Placement)
        {
            this._Input_Features = _Input_Features;
            this._Output_Feature_Class = _Output_Feature_Class;
            this._Point_Placement = _Point_Placement;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Generate Points Along Lines";

        public override string CallName => "management.GeneratePointsAlongLines";

        public override List<string> AcceptEnvironments => ["configKeyword", "outputMFlag", "outputZFlag", "workspace"];

        public override object[] ParameterInfo => [_Input_Features, _Output_Feature_Class, _Point_Placement.GetGPValue(), _Distance, _Percentage, _Include_End_Points.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The line or polygon features to be converted into points.</para>
        /// <para>要转换为点的线或面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The point feature class that will be created from the input features.</para>
        /// <para>将根据输入要素创建的点要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Feature_Class { get; set; }


        /// <summary>
        /// <para>Point Placement</para>
        /// <para><xdoc>
        ///   <para>Specifies the method used to create points.</para>
        ///   <bulletList>
        ///     <bullet_item>By percentage—The Percentage parameter value will be used to place points along the features by percentage.</bullet_item><para/>
        ///     <bullet_item>By distance—The Distance parameter value will be used to place points at fixed distances along the features. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于创建点的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按百分比—百分比参数值将用于按百分比沿要素放置点。</bullet_item><para/>
        ///     <bullet_item>按距离—距离参数值将用于沿要素以固定距离放置点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Placement")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Point_Placement_value _Point_Placement { get; set; }

        public enum _Point_Placement_value
        {
            /// <summary>
            /// <para>By percentage</para>
            /// <para>By percentage—The Percentage parameter value will be used to place points along the features by percentage.</para>
            /// <para>按百分比—百分比参数值将用于按百分比沿要素放置点。</para>
            /// </summary>
            [Description("By percentage")]
            [GPEnumValue("PERCENTAGE")]
            _PERCENTAGE,

            /// <summary>
            /// <para>By distance</para>
            /// <para>By distance—The Distance parameter value will be used to place points at fixed distances along the features. This is the default.</para>
            /// <para>按距离—距离参数值将用于沿要素以固定距离放置点。这是默认设置。</para>
            /// </summary>
            [Description("By distance")]
            [GPEnumValue("DISTANCE")]
            _DISTANCE,

        }

        /// <summary>
        /// <para>Distance</para>
        /// <para>The interval from the beginning of the feature at which points will be placed.</para>
        /// <para>从要素开始到放置点的间隔。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _Distance { get; set; } = null;


        /// <summary>
        /// <para>Percentage</para>
        /// <para>The percentage from the beginning of the feature at which points will be placed. For example, if a percentage of 40 is used, points will be placed at 40 percent and 80 percent of the feature's distance.</para>
        /// <para>从要素开始的百分比，将放置点。例如，如果使用 40 的百分比，则点将放置在要素距离的 40% 和 80% 处。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Percentage")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _Percentage { get; set; } = null;


        /// <summary>
        /// <para>Include End Points</para>
        /// <para><xdoc>
        ///   <para>Specifies whether additional points will be included at the start point and end point of the feature.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Additional points will be included at the start point and end point of the feature.</bullet_item><para/>
        ///     <bullet_item>Unchecked—No additional points will be included at the start point and end point of the feature. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在要素的起点和终点处包括其他点。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 要素的起点和终点将包括其他点。</bullet_item><para/>
        ///     <bullet_item>未选中 - 要素的起点和终点不会包含其他点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include End Points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Include_End_Points_value? _Include_End_Points { get; set; } = null;

        public enum _Include_End_Points_value
        {
            /// <summary>
            /// <para>END_POINTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("END_POINTS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_END_POINTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_END_POINTS")]
            [GPEnumValue("false")]
            _false,

        }

        public GeneratePointsAlongLines SetEnv(object configKeyword = null, object outputMFlag = null, object outputZFlag = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, outputMFlag: outputMFlag, outputZFlag: outputZFlag, workspace: workspace);
            return this;
        }

    }

}